<template>
  <el-button type="info" @click="logout">退出</el-button>
</template>

<script setup>
import router from '@/router/index.js'

const logout = () =>{
  // 清空token
  sessionStorage.clear()
  // 路由跳转到登录页
  router.push('/login')
}
</script>

<style scoped>

</style>